<!--引入wangEditor.css-->
<link rel="stylesheet" type="text/css" href="__PUBLIC__/dist/css/wangEditor.min.css">

<div class="wrap">
    <div class="post-topheader">
        <div class="container">
            <div class="row">
                <div class="col-md-9 col-sm-8 col-xs-12">

                    <span class="post-topheader__title--icon-symbol">
                        问
                    </span>
                    <div class="post-topheader__info">
                        <h1 class="h3 post-topheader__info--title" id="questionTitle" data-id="1010000006755145">
                            <a href="/q/1010000006755145">
                                <?php echo $data['title'] ?>
                            </a>
                        </h1>
                        <ul class="taglist--inline inline-block question__title--tag mr10">
                            <li class="tagPopup mb5">
                                <a class="tag" href="/t/node.js" data-toggle="popover" data-img="https://sfault-avatar.b0.upaiyun.com/740/312/74031254-1040000000089918_huge256"
                                data-placement="top" data-original-title="node.js" data-id="1040000000089918">
                                    node.js
                                </a>
                            </li>
                            <li class="tagPopup mb5">
                                <a class="tag" href="/t/webpack" data-toggle="popover" data-img="" data-placement="top"
                                data-original-title="webpack" data-id="1040000002490635">
                                    webpack
                                </a>
                            </li>
                        </ul>
                        <div class="question__author">
                            <a href="/u/laoqiren" class="mr5">
                                <strong>
                                    laoqiren
                                </strong>
                            </a>
                            1 小时前提问
                            <span class="hidden-xs">
                            </span>
                        </div>
                    </div>
                </div>
                <div class="col-md-3 col-sm-4 col-xs-12 hidden-xs">
                    <ul class="post-topheader__side list-unstyled">
                        <li>
                            <button type="button" id="sideFollow" class="btn btn-success btn-sm" data-id="1010000006755145"
                            data-do="follow" data-type="question" data-toggle="tooltip" data-placement="right"
                            title="" data-original-title="关注后将获得更新提醒">
                                关注
                            </button>
                            <strong>
                                3
                            </strong>
                            关注
                        </li>
                        <li>
                            <button type="button" id="sideBookmark" class="btn btn-default btn-sm"
                            data-id="1010000006755145" data-type="question">
                                收藏
                            </button>
                            <strong id="sideBookmarked">
                                0
                            </strong>
                            收藏，
                            <strong class="no-stress">
                                29
                            </strong>
                            浏览
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!-- end .post-topheader -->
    <div class="container mt30">
        <div class="row">
            <div class="col-xs-12 col-md-9 main">
                <article class="widget-question__item">
                    <div class="post-col">
                        <div class="widget-vote  ">
                            <button type="button" class="like" data-id="1010000006755145" data-type="question"
                            data-do="like" data-toggle="tooltip" data-placement="top" title="" data-original-title="问题对人有帮助，内容完整，我也想知道答案">
                                <span class="sr-only">
                                    问题对人有帮助，内容完整，我也想知道答案
                                </span>
                            </button>
                            <span class="count">
                                0
                            </span>
                            <button type="button" class="hate" data-id="1010000006755145" data-type="question"
                            data-do="hate" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="问题没有实际价值，缺少关键内容，没有改进余地">
                                <span class="sr-only">
                                    问题没有实际价值，缺少关键内容，没有改进余地
                                </span>
                            </button>
                        </div>
                        <!-- end .widget-vote -->
                    </div>
                    <div class="post-offset">
                        <div class="question fmt" data-id="1010000006755145">
                            <?php echo htmlspecialchars_decode($data['content']) ?>
                        </div>
                        <div class="row">
                            <div class="post-opt col-md-8">
                                <ul class="list-inline mb0">
                                    <li>
                                        <a href="/q/1010000006755145">
                                           <?php echo CT($data['create_time']) ?>提问
                                        </a>
                                    </li>
                                    <li data-toggle="tooltip" data-placement="top" title="" class="edit-btn js__rank-check "
                                    data-original-title="声望需要达到 200">
                                        <a href="javascript:;">
                                            编辑
                                        </a>
                                    </li>
                                    <li>
                                        <a href="javascript:void(0);" class="comments" data-id="1010000006755145"
                                        data-target="#comment-1010000006755145">
                                            评论
                                        </a>
                                    </li>
                                    <li class="edit-btn js__rank-check" data-toggle="tooltip" data-placement="top"
                                    title="" data-original-title="声望需要达到 15">
                                        <a class="  " href="javascript:;" data-title="node服务的路径问题" data-url="http://sfau.lt/bNCvt7"
                                        data-id="1010000006755145">
                                            邀请回答
                                        </a>
                                    </li>
                                    <li class="dropdown js__content-ops" data-module="question" data-typetext="问题"
                                    data-id="1010000006755145">
                                        <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">
                                            更多
                                            <b class="caret">
                                            </b>
                                        </a>
                                        <ul class="dropdown-menu dropdown-menu-left">
                                            <li>
                                                <a href="#911" data-toggle="modal" data-target="#911" data-action="report">
                                                    举报
                                                </a>
                                            </li>
                                            <li>
                                                <a href="javascript:void(0);" data-toggle="modal" data-target="#911" data-action="close">
                                                    关闭
                                                </a>
                                            </li>
                                        </ul>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="widget-comments hidden" id="comment-1010000006755145" data-id="1010000006755145">
                            <div class="widget-comments__form row">
                                <form class="clearfix" method="POST">
                                    <div class="form-group mb0 widget-comments__form--input">
                                        <input name="id" type="hidden" value="1010000006755145">
                                        <textarea rows="1" name="text" class="form-control mono" id="commentText-1010000006755145"
                                        data-id="1010000006755145" placeholder="使用评论询问更多信息或提出修改意见，请不要在评论里回答问题">
                                        </textarea>
                                    </div>
                                    <div class="widget-comments__btn">
                                        <div class="pull-right">
                                            <button type="submit" class="btn btn-default postComment" data-id="1010000006755145">
                                                提交评论
                                            </button>
                                            <span class="widget-comments__btn--tips">
                                                <a href="javascript:void(0);" class="toggle-comment-helper" title="语法提示">
                                                    <i class="fa fa-question-circle">
                                                    </i>
                                                </a>
                                            </span>
                                        </div>
                                    </div>
                                </form>
                                <div class="col-md-12">
                                    <div class="alert alert-warning alert-dismissible mb0 mt10 fmt comment-helper"
                                    data-rank="0" style="display:none;" role="alert">
                                        <button type="button" class="close" data-dismiss="alert" aria-label="Close"
                                        style="right:0;">
                                            <span aria-hidden="true">
                                                ×
                                            </span>
                                        </button>
                                        评论支持部分 Markdown 语法：
                                        <code>
                                            **bold**
                                        </code>
                                        <code>
                                            _italic_
                                        </code>
                                        <code>
                                            [link](http://example.com)
                                        </code>
                                        <code>
                                            &gt; 引用
                                        </code>
                                        <code>
                                            `code`
                                        </code>
                                        <code>
                                            - 列表
                                        </code>
                                        。
                                        <br>
                                        同时，被你 @ 的用户也会收到通知
                                    </div>
                                </div>
                            </div>
                            <!-- /.widget-comments__form -->
                        </div>
                        <!-- /.widget-comments -->
                    </div>
                    <!-- end .post-offset -->
                </article>
                <div class="widget-answers">
                    <div class="btn-group pull-right" role="group">
                        <a href="/q/1010000006755145#answers-title" id="sortby-rank" class="btn btn-default btn-xs active">
                            默认排序
                        </a>
                        <a href="?sort=created#answers-title" id="sortby-created" class="btn btn-default btn-xs">
                            时间排序
                        </a>
                    </div>
                    <h2 class="title h4 mt30 mb20 post-title" id="answers-title">
                        2个回答
                    </h2>
                    <!-- /article -->
                    <?php foreach ($answers as  $row) { ?>
                    <article class="clearfix widget-answers__item" id="a-1020000006756812">
                        <div class="post-col">
                            <div class="widget-vote ">
                                <button type="button" class="like" data-id="1020000006756812" data-type="answer"
                                data-do="like" data-toggle="tooltip" data-placement="top" title="" data-original-title="答案对人有帮助，有参考价值">
                                    <span class="sr-only">
                                        答案对人有帮助，有参考价值
                                    </span>
                                </button>
                                <span class="count">
                                    0
                                </span>
                                <button type="button" class="hate" data-id="1020000006756812" data-type="answer"
                                data-do="hate" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="答案没帮助，是错误的答案，答非所问">
                                    <span class="sr-only">
                                        答案没帮助，是错误的答案，答非所问
                                    </span>
                                </button>
                            </div>
                        </div>
                        <div class="post-offset">
                            <div class="answer fmt" data-id="1020000006756812">
                                <?php echo htmlspecialchars_decode($row['content']) ?>
                            </div>
                            <div class="row answer__info--row">
                                <div class="post-opt col-md-8 col-sm-8 col-xs-10">
                                    <ul class="list-inline mb0">
                                        <li>
                                            <a href="/q/1010000006755145/a-1020000006756812">
                                                刚刚回答
                                            </a>
                                            <span class="text-muted">
                                            </span>
                                        </li>
                                        <li data-toggle="tooltip" data-placement="top" title="" class="edit-btn js__rank-check"
                                        data-original-title="声望需要达到 200">
                                            <a href="javascript:;">
                                                编辑
                                            </a>
                                        </li>
                                        <li>
                                            <a href="javascript:void(0);" class="comments" data-id="1020000006756812"
                                            data-target="#comment-1020000006756812">
                                                评论
                                            </a>
                                        </li>
                                        <li class="dropdown js__content-ops" data-typetext="答案" data-module="answer"
                                        data-id="1020000006756812">
                                            <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">
                                                更多
                                                <b class="caret">
                                                </b>
                                            </a>
                                            <ul class="dropdown-menu dropdown-menu-left">
                                                <li>
                                                    <a href="#911" data-toggle="modal" data-target="#911" data-action="report">
                                                        举报
                                                    </a>
                                                </li>
                                            </ul>
                                        </li>
                                    </ul>
                                </div>
                                <div class="col-md-2 col-sm-2 col-xs-2 answer__info--author-avatar">
                                    <a class="mr10" href="/u/ucdok">
                                        <img class="avatar-32 " data-toggle="popover" data-slug="ucdok" data-id="1030000000182863"
                                        src="https://sfault-avatar.b0.upaiyun.com/124/343/1243437834-5434e1360cc79_big64"
                                        alt="">
                                    </a>
                                </div>
                                <div class="col-md-2 col-sm-2 hidden-xs answer__info--author">
                                    <div class=" answer__info--author-warp">
                                        <a class="answer__info--author-name" title="老雷" href="/u/ucdok">
                                            老雷
                                        </a>
                                        <span class="answer__info--author-rank">
                                            662 声望
                                        </span>
                                    </div>
                                </div>
                            </div>
                            <div class="widget-comments hidden" id="comment-1020000006756812" data-id="1020000006756812">
                                <div class="widget-comments__form row">
                                    <form class="clearfix" method="POST">
                                        <div class="form-group mb0 widget-comments__form--input">
                                            <input name="id" type="hidden" value="1020000006756812">
                                            <textarea rows="1" name="text" class="form-control mono" id="commentText-1020000006756812"
                                            data-id="1020000006756812" placeholder="使用评论询问更多信息或提出修改意见，请不要在评论里回答问题">
                                            </textarea>
                                        </div>
                                        <div class="widget-comments__btn">
                                            <div class="pull-right">
                                                <button type="submit" class="btn btn-default postComment" data-id="1020000006756812">
                                                    提交评论
                                                </button>
                                                <span class="widget-comments__btn--tips">
                                                    <a href="javascript:void(0);" class="toggle-comment-helper" title="语法提示">
                                                        <i class="fa fa-question-circle">
                                                        </i>
                                                    </a>
                                                </span>
                                            </div>
                                        </div>
                                    </form>
                                    <div class="col-md-12">
                                        <div class="alert alert-warning alert-dismissible mb0 mt10 fmt comment-helper"
                                        data-rank="0" style="display:none;" role="alert">
                                            <button type="button" class="close" data-dismiss="alert" aria-label="Close"
                                            style="right:0;">
                                                <span aria-hidden="true">
                                                    ×
                                                </span>
                                            </button>
                                            评论支持部分 Markdown 语法：
                                            <code>
                                                **bold**
                                            </code>
                                            <code>
                                                _italic_
                                            </code>
                                            <code>
                                                [link](http://example.com)
                                            </code>
                                            <code>
                                                &gt; 引用
                                            </code>
                                            <code>
                                                `code`
                                            </code>
                                            <code>
                                                - 列表
                                            </code>
                                            。
                                            <br>
                                            同时，被你 @ 的用户也会收到通知
                                        </div>
                                    </div>
                                </div>
                                <!-- /.widget-comments__form -->
                            </div>
                            <!-- /.widget-comments -->
                        </div>
                    </article>
                    <?php } ?>
                    <!-- /article -->
                    <div class="text-center">
                    </div>
                </div>
                <!-- /.widget-answers -->
                <div style="padding-left: 65px;" id="goToAnswerEditor">
                    <h4>
                        撰写答案
                    </h4>
                    <form action="{:U('index/answer/add')}" method="post" class="editor-wrap">
                        <textarea id="xbscontents" style="height:200px;" name="content"></textarea>
                        <input type="hidden" name="qid" value="<?php echo $data['id'] ?>">

                        <div class="pull-right">
                            <button type="submit" id="answerIt" class="btn btn-lg btn-primary ml20">提交回答
                            </button>
                        </div>
                        
                    </form>
                </div>
                <div class="widget-invite mt30">
                    <p>
                        <span class="text-muted">
                            不知道答案？你还可以
                        </span>
                        <a href="#" class="btn btn-default btn-sm inviteBtn ml5" data-title="node服务的路径问题"
                        data-url="http://sfau.lt/bNCvt7" data-id="1010000006755145">
                            邀请回答
                        </a>
                        <a class="qa-detail__invent-switch pull-right" href="javascript:;">
                            <i class="fa fa-refresh">
                            </i>
                            换一组
                        </a>
                    </p>
                    <div class="qa-detail__invent">
                        <div class="row">
                            <div class="col-md-6 qa-detail__invent-item">
                                <img src="https://sfault-avatar.b0.upaiyun.com/266/355/2663554584-5799a8002cd74_big64">
                                <div class="qa-detail__invent-info">
                                    <a class="qa-detail__invent-name" target="_blank" href="/u/1024dylan">
                                        谷雨
                                    </a>
                                    <span class="qa-detail__invent-desc">
                                        node.js 标签下有 0 个回答
                                    </span>
                                </div>
                                <button class="btn btn-default btn-xs
                                qa-detail__invent-btn
                                " data-id="1030000004998154" data-slug="1024dylan">
                                    邀请回答
                                </button>
                            </div>
                            <div class="col-md-6 qa-detail__invent-item">
                                <img src="https://sfault-avatar.b0.upaiyun.com/120/260/1202606141-1030000000585904_big64">
                                <div class="qa-detail__invent-info">
                                    <a class="qa-detail__invent-name" target="_blank" href="/u/leftstick">
                                        leftstick
                                    </a>
                                    <span class="qa-detail__invent-desc">
                                        node.js 标签下有 167 个回答
                                    </span>
                                </div>
                                <button class="btn btn-default btn-xs
                                qa-detail__invent-btn
                                " data-id="1030000000585904" data-slug="leftstick">
                                    邀请回答
                                </button>
                            </div>
                            <div class="col-md-6 qa-detail__invent-item">
                                <img src="https://sfault-avatar.b0.upaiyun.com/154/503/1545036349-57907f87e5ee5_big64">
                                <div class="qa-detail__invent-info">
                                    <a class="qa-detail__invent-name" target="_blank" href="/u/jafeney">
                                        jafeney
                                    </a>
                                    <span class="qa-detail__invent-desc">
                                        node.js 标签下有 1 个回答
                                    </span>
                                </div>
                                <button class="btn btn-default btn-xs
                                qa-detail__invent-btn
                                " data-id="1030000004423434" data-slug="jafeney">
                                    邀请回答
                                </button>
                            </div>
                            <div class="col-md-6 qa-detail__invent-item">
                                <img src="https://sfault-avatar.b0.upaiyun.com/390/273/3902733087-56b3076b8f3bb_big64">
                                <div class="qa-detail__invent-info">
                                    <a class="qa-detail__invent-name" target="_blank" href="/u/wilee">
                                        wilee
                                    </a>
                                    <span class="qa-detail__invent-desc">
                                        node.js 标签下有 1 个回答
                                    </span>
                                </div>
                                <button class="btn btn-default btn-xs
                                qa-detail__invent-btn
                                " data-id="1030000000133388" data-slug="wilee">
                                    邀请回答
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /.main -->
            <div class="col-xs-12 col-md-3 side">
                <div class="sfad-sidebar">
                    <div class="sfad-item">
                        <ins>
                            <div id="beacon_fd0c306bb7" style="position: absolute; left: 0px; top: 0px; visibility: hidden;">
                                <img src="https://sponsor.segmentfault.com/lg.php?bannerid=0&amp;campaignid=0&amp;zoneid=1&amp;loc=https%3A%2F%2Fsegmentfault.com%2Fq%2F1010000006755145&amp;referer=https%3A%2F%2Fsegmentfault.com%2F&amp;cb=fd0c306bb7"
                                width="0" height="0" alt="" style="width: 0px; height: 0px;">
                            </div>
                        </ins>
                        <button class="close" type="button" aria-hidden="true">
                            ×
                        </button>
                    </div>
                </div>
                <div data-type="widget" data-api="/api/bookmarkArchive/hots" data-api-overwrite="/api/bookmarkArchive/1010000006755145/related">

<script type="text/javascript" src="__PUBLIC__/dist/js/wangEditor.min.js"></script>

<!--这里引用jquery和wangEditor.js-->
<script type="text/javascript">
    var editor = new wangEditor('xbscontents');
    // 自定义菜单
    editor.config.menus = [
        'source',
        'location',
        '|',
        'bold',
        'underline',
        'italic',
        'strikethrough',
        'eraser',
        'forecolor',
        'bgcolor'
    ];
    editor.create();
</script>
